<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title></title>
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
    <script></script>
</head>
<!-- 分别使用filter实现带有class属性的文本（jQuery）变红 -->
<body>
    <ul>
        <li>HTML</li>
        <li>CSS</li>
        <li>JavaScript</li>
        <li class="select">jQuery</li>
        <li>Vue.js</li>
    </ul>
</body>
<script type="text/javascript">
    $(function(){
        $('li').filter('.select').css('color','red');
    })
    
    //$('li[class]').css('color','red');
</script>
</html>